import request from '@/utils/request'

// 查询出库单管理列表
export function listStockOut(query) {
  return request({
    url: '/wms/wms/stockOut/list',
    method: 'get',
    params: query
  })
}

// 查询出库单管理详细
export function getStockOut(stockOutUuid) {
  return request({
    url: '/wms/wms/stockOut/' + stockOutUuid,
    method: 'get'
  })
}

// 更新库存
export function updInventory(uuid) {
  return request({
    url: '/wms/wms/stockOut/upd-inventory/' + uuid,
    method: 'get'
  })
}

// 更新库存
export function updInventoryLoss(uuid) {
  return request({
    url: '/wms/wms/stockOut/upd-inventory-loss/' + uuid,
    method: 'get'
  })
}

// 新增出库单管理
export function addStockOut(data) {
  return request({
    url: '/wms/wms/stockOut',
    method: 'post',
    data: data
  })
}

// 修改出库单管理
export function updateStockOut(data) {
  return request({
    url: '/wms/wms/stockOut',
    method: 'put',
    data: data
  })
}

// 删除出库单管理
export function delStockOut(stockOutUuid) {
  return request({
    url: '/wms/wms/stockOut/' + stockOutUuid,
    method: 'delete'
  })
}
